package com.scwatch.core.domain;


import org.apache.commons.lang3.StringUtils;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "cms_livebroadcast_room")
public class LiveBroadcastRoom implements java.io.Serializable{
    private static final long serialVersionUID = 1L;

    private Integer id;
    private String content;
    private String image;
    private String video;
    private Integer liveId;
    private Date time;

    @Id
    @Column(name = "f_liveroom_id", unique = true, nullable = false)
    @TableGenerator(name = "tg_cms_livebroadcast_room", pkColumnValue = "cms_livebroadcast_room", initialValue = 1, allocationSize = 10)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_cms_livebroadcast_room")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "f_live_Content", nullable = false)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Column(name = "f_image")
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Column(name = "f_video")
    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

//    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "f_live_broadcast_id", nullable = false)
    public Integer getLiveId() {
        return liveId;
    }

    public void setLiveId(Integer liveId) {
        this.liveId = liveId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "f_livetime")
    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

}

